<?php

namespace App\Service\Index\v1_3_0;

use App\Model\UserFreeCall;
use App\Service\BaseService;

/**
 * 查询是否有新人免费券
 */
class CheckFreeNumService extends BaseService
{
    public function handle()
    {
        $userId = $this->getUserId();
        //是否已经用完免费通话券
        $freeCallNum = UserFreeCall::checkValid($userId, date('Y-m-d'), UserFreeCall::STATUS_OK, 'count');
        return ['free_call_coupon' => $freeCallNum];
    }
}
